package com.shao.im.entity;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.util.Date;

@Data
public class Student {

    private Integer id;
    @NotBlank(message = "用户名不能为空！")
    @Size(min = 2, max = 3)
    private String name;
    @NotNull(message = "年龄不能为空！")
    @Min(value = 18, message = "年龄不能低于{value}岁！")
    private Integer age;
    @Past(message = "生日范围不正确！")
    private Date birthday;
}
